package com.example.myapplication.KeChengFragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import com.example.myapplication.KeChengJiPinBanJiAdapter.KeChengJingPinBanJiAdapter;
import com.example.myapplication.KeChengJinPinBanJiBean.KeChengJiBanBanJiBean;
import com.example.myapplication.R;

import java.util.ArrayList;
import java.util.List;

public class KeChengJingPinBanJiFragment extends Fragment {
    ListView KeChengJingPinBanJi_lv;
    List<KeChengJiBanBanJiBean>list=new ArrayList<>();

    KeChengJingPinBanJiAdapter keChengJingPinBanJiAdapter;
    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view=inflater.inflate(R.layout.kecheng_fragment_jingpinbanji,container,false);

        KeChengJingPinBanJi_lv=view.findViewById(R.id.KeCheng_Fragment_JingPinBanJi_lv);

        list.add(new KeChengJiBanBanJiBean("第七班","未购买","忍术","体术","2023-2024","3人","$998","$114514","已报名0人"));
        list.add(new KeChengJiBanBanJiBean("高等元素反应学","未购买","元素反应理论","元素反应实践","2023-2024","4人","$998","$114514","已报名0人"));
        list.add(new KeChengJiBanBanJiBean("舰长培训","未购买","造船技术","指挥理论及实践","2023-2024","1人","$998","$114514","已报名0人"));
        list.add(new KeChengJiBanBanJiBean("辰司培训","未购买","“暴雨”知识理论","高等魔法","2023-2024","1人","$998","$114514","已报名0人"));

        keChengJingPinBanJiAdapter=new KeChengJingPinBanJiAdapter(list,getActivity());
        KeChengJingPinBanJi_lv.setAdapter(keChengJingPinBanJiAdapter);

        return view;
    }
}
